<template>
  <div>
    <input type="button" value="我是父组件中的按钮" @click="show" />
    <!-- <child @update:isShow="bol=>isShow=bol" v-show="isShow" /> -->

        <!-- 语法糖 -->
        <!-- <child :isShow.sync="isShow"  /> -->
        <!-- 本来的写法  -->
         <!-- <child @update:visible="bol=>dialogVisible=bol"  :visible='dialogVisible'/>   -->
             <child :visible.sync="dialogVisible"  />
       <!-- :visible.sync="dialogVisible" -->
  </div>
</template>
<script>
import child from "./child";
export default {
  data() {
    return {
      dialogVisible: false,
    };
  },
  components: {
    child,
  },
  methods: {
    show() {
      this.dialogVisible = true;
    },
    changeIsShow(bol) {
      this.isShow = bol;
    },
  },
};
</script>